﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/ShenBaoGuanLiQYSH_YBQY.master"
    AutoEventWireup="true" CodeFile="fengmian.aspx.cs" Inherits="ShenBaoGuanLi_QiYeShenHe_YBQY_fengmian" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder5" runat="Server">
    <table style="width: 924px;">
        <tr>
            <td style="width: 456px">
                <table class="style1" style="width: 97%">
                    <tr>
                        <td style="width: 104px">
                            申报登记代码
                        </td>
                        <td style="width: 328px">
                            <asp:TextBox ID="TextBox1" runat="server" Width="307px" onclick="gettishi('10100001')"
                                ReadOnly="True" BorderStyle="None"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 456px">
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                    <Services>
                        <asp:ServiceReference Path="../Service.svc" />
                    </Services>
                </asp:ScriptManager>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 456px">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center; font-size: x-large">
                排放污染物申报登记表（试行）
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center">
                <span style="font-size: x-large">申报年度：<asp:TextBox ID="TextBox2" runat="server" Width="76px"
                    onclick="gettishi('10100002')" ReadOnly="True" BorderStyle="None"></asp:TextBox>
                </span>
            </td>
        </tr>
        <tr>
            <td style="width: 456px">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 456px">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 456px">
                <table class="style1">
                    <tr>
                        <td style="width: 103px">
                            行政区划代码
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox3" runat="server" Width="181px" onclick="gettishi('10100003')"
                                ReadOnly="True" BorderStyle="None"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
            <td>
                <table class="style1">
                    <tr>
                        <td style="width: 138px">
                            单位名称（盖章）
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox4" runat="server" Width="302px" onclick="gettishi('10100007')"
                                BorderStyle="None" ReadOnly="True"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 456px">
                法定代表人（签章）<asp:TextBox ID="TextBox5" runat="server" onclick="gettishi('10100004')"
                    ReadOnly="True"></asp:TextBox>
            </td>
            <td>
                申报单位法人代码<asp:TextBox ID="TextBox7" runat="server" Width="257px" onclick="gettishi('10100008')"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 456px">
                填表人<asp:TextBox ID="TextBox6" runat="server" onclick="gettishi('10100006')" ReadOnly="True"></asp:TextBox>
            </td>
            <td>
                报出日期：<asp:TextBox ID="TextBox8" runat="server" Width="56px" onclick="gettishi('10100009')"
                    ReadOnly="True"></asp:TextBox>年
                <asp:TextBox ID="TextBox9" runat="server" Width="34px" onclick="gettishi('10100009')"
                    ReadOnly="True"></asp:TextBox>月
                <asp:TextBox ID="TextBox10" runat="server" Width="37px" onclick="gettishi('10100009')"
                    ReadOnly="True"></asp:TextBox>日
            </td>
        </tr>
        <tr>
            <td style="width: 456px">
                &nbsp;
                <asp:HiddenField ID="HiddenField1" runat="server" />
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
    <input id="Text100" style="visibility: hidden" type="text" value="<%=DisplayStr()%>" />
    <div class="myGuanLiShuRu1">
        <table>
            <tr>
                <td style="width: 137px">
                    &nbsp;
                </td>
                <td>
                    <asp:Label ID="WanChenTiShi" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align: left;" colspan="2">
                    审核内容<asp:TextBox ID="ShenHeNeiRong" runat="server" ReadOnly="True"></asp:TextBox>
                    审核意见<asp:TextBox ID="ShenHeYiJian" runat="server" Width="441px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="text-align: left;" colspan="2">
                    <div  id="ck" style="float:left;width:100px">参考审核意见</div>
                    <div id="ts"><div>
                    <input id="Radio1"
                         name="ckshyj"  checked="checked" style="width: 20px" type="radio" /></div>
                    <script type="text/javascript">
                        //删除指定元素
                        function delUpload(diva) {
                            count--;
                            document.getElementById(diva).parentNode.removeChild(document.getElementById(diva));
                        }

                        // 增加元素
                        function addUpload() {
                            var str2 = document.getElementById("Text100").value;
                            //str2.replace(/\'/g, "\"");
                            //取得文本框的值

                            var arr = eval(str2);


                            for (var i = 0; i < arr.length; i++) {
                                if (arr[i].tishiid == str) {
                                    if (arr[i].ti1.length > 0) {
                                        document.getElementById("TextArea1").value = arr[i].idmingcheng + "填写说明:  " + arr[i].ti1;
                                    }
                                    if (arr[i].ti2.length > 0) {
                                        document.getElementById("TextArea2").value = arr[i].ti2;
                                    }
                                    if (arr[i].ti3.length > 0) {
                                        document.getElementById("TextArea3").value = arr[i].idmingcheng + "填写例子:  " + arr[i].ti3;
                                    }
                                }
                            }

                            //自增id不同的HTML对象，并附加到容器最后
                            var newDiv = "<div id=tishi>"            + " <input id=file" + count + " type=file size=50 name=upload>"
                                   + " <a href=javascript:delUpload('divUpload" + count + "');>删除</a>"
                                   + " </div>";
                            document.getElementById("ckshyj").insertAdjacentHTML("beforeEnd", newDiv);
                        }   

                
                    </script>
                    </div>
            </tr>
            <tr>
                <td style="width: 137px">
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" />
                </td>
            </tr>
            <tr>
                <td style="height: 144px;" colspan="2">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource3"
                        Width="892px">
                        <Columns>
                            <asp:BoundField DataField="ziduanmingcheng" HeaderText="审核内容" SortExpression="ziduanmingcheng">
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="shenheyijian" HeaderText="审核意见" SortExpression="shenheyijian">
                                <ItemStyle Width="700px" />
                            </asp:BoundField>
                            <asp:CommandField ShowDeleteButton="True">
                                <ItemStyle Width="60px" />
                            </asp:CommandField>
                        </Columns>
                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConflictDetection="CompareAllValues"
                        ConnectionString="<%$ ConnectionStrings:ConnectionStringole %>" DeleteCommand="DELETE FROM [ShenHeYiJian] WHERE [id] = ? AND (([qiyeid] = ?) OR ([qiyeid] IS NULL AND ? IS NULL)) AND (([ShenBaoNianDu] = ?) OR ([ShenBaoNianDu] IS NULL AND ? IS NULL)) AND (([biaohao] = ?) OR ([biaohao] IS NULL AND ? IS NULL)) AND (([ziduanmingcheng] = ?) OR ([ziduanmingcheng] IS NULL AND ? IS NULL)) AND (([shenheyijian] = ?) OR ([shenheyijian] IS NULL AND ? IS NULL)) AND (([shifouchuli] = ?) OR ([shifouchuli] IS NULL AND ? IS NULL))"
                        InsertCommand="INSERT INTO [ShenHeYiJian] ([id], [qiyeid], [ShenBaoNianDu], [biaohao], [ziduanmingcheng], [shenheyijian], [shifouchuli]) VALUES (?, ?, ?, ?, ?, ?, ?)"
                        OldValuesParameterFormatString="original_{0}" ProviderName="<%$ ConnectionStrings:ConnectionStringole.ProviderName %>"
                        SelectCommand="SELECT * FROM [ShenHeYiJian] WHERE (([qiyeid] = ?) AND ([ShenBaoNianDu] = ?) AND ([biaohao] = ?) AND ([shifouchuli] = ?)) ORDER BY [id] DESC"
                        UpdateCommand="UPDATE [ShenHeYiJian] SET [qiyeid] = ?, [ShenBaoNianDu] = ?, [biaohao] = ?, [ziduanmingcheng] = ?, [shenheyijian] = ?, [shifouchuli] = ? WHERE [id] = ? AND (([qiyeid] = ?) OR ([qiyeid] IS NULL AND ? IS NULL)) AND (([ShenBaoNianDu] = ?) OR ([ShenBaoNianDu] IS NULL AND ? IS NULL)) AND (([biaohao] = ?) OR ([biaohao] IS NULL AND ? IS NULL)) AND (([ziduanmingcheng] = ?) OR ([ziduanmingcheng] IS NULL AND ? IS NULL)) AND (([shenheyijian] = ?) OR ([shenheyijian] IS NULL AND ? IS NULL)) AND (([shifouchuli] = ?) OR ([shifouchuli] IS NULL AND ? IS NULL))">
                        <DeleteParameters>
                            <asp:Parameter Name="original_id" Type="Int32" />
                            <asp:Parameter Name="original_qiyeid" Type="Int32" />
                            <asp:Parameter Name="original_qiyeid" Type="Int32" />
                            <asp:Parameter Name="original_ShenBaoNianDu" Type="String" />
                            <asp:Parameter Name="original_ShenBaoNianDu" Type="String" />
                            <asp:Parameter Name="original_biaohao" Type="String" />
                            <asp:Parameter Name="original_biaohao" Type="String" />
                            <asp:Parameter Name="original_ziduanmingcheng" Type="String" />
                            <asp:Parameter Name="original_ziduanmingcheng" Type="String" />
                            <asp:Parameter Name="original_shenheyijian" Type="String" />
                            <asp:Parameter Name="original_shenheyijian" Type="String" />
                            <asp:Parameter Name="original_shifouchuli" Type="Int32" />
                            <asp:Parameter Name="original_shifouchuli" Type="Int32" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="id" Type="Int32" />
                            <asp:Parameter Name="qiyeid" Type="Int32" />
                            <asp:Parameter Name="ShenBaoNianDu" Type="String" />
                            <asp:Parameter Name="biaohao" Type="String" />
                            <asp:Parameter Name="ziduanmingcheng" Type="String" />
                            <asp:Parameter Name="shenheyijian" Type="String" />
                            <asp:Parameter Name="shifouchuli" Type="Int32" />
                        </InsertParameters>
                        <SelectParameters>
                            <asp:SessionParameter Name="qiyeid" SessionField="qiyeid" Type="Int32" />
                            <asp:SessionParameter Name="ShenBaoNianDu" SessionField="shenbaoniandu" Type="String" />
                            <asp:ControlParameter ControlID="HiddenField1" Name="biaohao" PropertyName="Value"
                                Type="String" />
                            <asp:Parameter DefaultValue="0" Name="shifouchuli" Type="Int32" />
                        </SelectParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="qiyeid" Type="Int32" />
                            <asp:Parameter Name="ShenBaoNianDu" Type="String" />
                            <asp:Parameter Name="biaohao" Type="String" />
                            <asp:Parameter Name="ziduanmingcheng" Type="String" />
                            <asp:Parameter Name="shenheyijian" Type="String" />
                            <asp:Parameter Name="shifouchuli" Type="Int32" />
                            <asp:Parameter Name="original_id" Type="Int32" />
                            <asp:Parameter Name="original_qiyeid" Type="Int32" />
                            <asp:Parameter Name="original_qiyeid" Type="Int32" />
                            <asp:Parameter Name="original_ShenBaoNianDu" Type="String" />
                            <asp:Parameter Name="original_ShenBaoNianDu" Type="String" />
                            <asp:Parameter Name="original_biaohao" Type="String" />
                            <asp:Parameter Name="original_biaohao" Type="String" />
                            <asp:Parameter Name="original_ziduanmingcheng" Type="String" />
                            <asp:Parameter Name="original_ziduanmingcheng" Type="String" />
                            <asp:Parameter Name="original_shenheyijian" Type="String" />
                            <asp:Parameter Name="original_shenheyijian" Type="String" />
                            <asp:Parameter Name="original_shifouchuli" Type="Int32" />
                            <asp:Parameter Name="original_shifouchuli" Type="Int32" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
